
import {simpleServer} from '@/tools/servers'

/**
 * 招租商铺
 */
export class ShopsService {
    // 分页查询列表
    static findShopss (pageDTO) {
        var httpMethod = 'POST';
        var body = simpleServer.getArgs(this.findShopss,arguments,'POST');
        return simpleServer.connection(httpMethod, '/simple/news/Shops/findShopss', body);
    }


    //根据招租商铺Id查询招租商铺
    static findShops (shopsId) {
        var httpMethod = 'GET';
        var body = simpleServer.getArgs(this.findShops ,arguments,'GET');
        return simpleServer.connection(httpMethod, '/simple/news/Shops/findShops',body);
    }

    //为了编辑,根据招租商铺Id查询招租商铺
    static findShopsForEdit(shopsId) {
        var httpMethod = 'GET';
        var body = simpleServer.getArgs(this.findShopsForEdit ,arguments,'GET');
        return simpleServer.connection(httpMethod, '/simple/news/Shops/findShopsForEdit',body);
    }

    //为了查看,根据招租商铺Id查询招租商铺，所有外键字段的名称都已加载
    static findShopsForView(shopsId) {
        var httpMethod = 'GET';
        var body = simpleServer.getArgs(this.findShopsForView ,arguments,'GET');
        return simpleServer.connection(httpMethod, '/simple/news/Shops/findShopsForView',body);
    }

    //创建新的招租商铺
    static createShops() {
        var httpMethod = 'GET';
        var body = simpleServer.getArgs(this.createShops,arguments,'GET');
        return simpleServer.connection(httpMethod, '/simple/news/Shops/createShops',body);
    }

    //保存招租商铺
    static saveShops(shops) {
        var httpMethod = 'POST';
        var body = simpleServer.getArgs(this.saveShops,arguments,'POST');
        return simpleServer.connection(httpMethod, '/simple/news/Shops/saveShops', body);
    }

    //编辑招租商铺
    static updateShops (shops) {
        var httpMethod = 'POST';
        var body = simpleServer.getArgs(this.updateShops,arguments,'POST');
        return simpleServer.connection(httpMethod, '/simple/news/Shops/updateShops', body);
    }

    //根据招租商铺Id删除招租商铺
    static deleteShops (shopsId) {
        var httpMethod = 'GET';
        var body = simpleServer.getArgs(this.deleteShops,arguments,'GET');
        return simpleServer.connection(httpMethod, '/simple/news/Shops/deleteShops',body);
    }

    //为了查看,根据招租商铺Id查询招租商铺，只加载ID 和 名称
    static findShopssWithIdNameById(shopsId) {
        var httpMethod = 'GET';
        var body = simpleServer.getArgs(this.findShopssWithIdNameById ,arguments,'GET');
        return simpleServer.connection(httpMethod, '/simple/news/Shops/findShopssWithIdNameById',body);
    }

    //为了查看,根据招租商铺 名称 查询招租商铺，只加载ID 和 名称
    static findShopssWithIdNameByName(shopsName) {
        var httpMethod = 'GET';
        var body = simpleServer.getArgs(this.findShopssWithIdNameByName ,arguments,'GET');
        return simpleServer.connection(httpMethod, '/simple/news/Shops/findShopssWithIdNameByName',body);
    }


}
